package com.school.sports.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.school.sports.entity.Rank;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface RankMapper extends BaseMapper<Rank> {

    /**
     * 根据项目ID查询排名及关联信息（用Rank实体接收）
     */
    List<Rank> selectRankWithRelations(@Param("projectId") Long projectId);

    /**
     * 查询所有排名及关联信息
     */
    List<Rank> selectAllRankWithRelations();

    /**
     * 根据ID查询单条排名及关联信息
     */
    Rank selectByIdWithRelations(@Param("id") Long id);
}